// 路由模块
import VueRouter from "vue-router"

// 导入组件模块
import home from "./components/tabbar/home.vue"
import member from "./components/tabbar/member.vue"
import shopcar from "./components/tabbar/shopcar.vue"
import search from "./components/tabbar/search.vue"
import newslist from "./components/news/newslist.vue"
import newsInfo from "./components/news/newsInfo.vue"
import photolist from "./components/photos/photolist.vue"
import photoInfo from "./components/photos/photoInfo.vue"
import goodsList from "./components/goods/goodsList.vue" 
import goodInfo from "./components/goods/goodInfo.vue" 
import goodsDesc from "./components/goods/goodsDesc.vue" 
import goodsComment from "./components/goods/goodsComment.vue" 

var router = new VueRouter({
   routes:[
        {path:'/',component:home},
        {path:"/home",component:home},
        {path:"/member",component:member},
        {path:"/shopcar",component:shopcar},
        {path:"/search",component:search},
        {path:"/home/newslist",component:newslist},
        // :id 表示符合指定规则 就跳转
        {path:'/home/newsInfo/:id',component:newsInfo},
        {path:'/home/photolist',component:photolist},
        {path:"/home/photoInfo/:id",component:photoInfo},
        {path:"/home/goodsList",component:goodsList},
        {path:"/home/goodInfo",component:goodInfo},
        {path:"/home/goodsDesc",component:goodsDesc},
        {path:"/home/goodsComment",component:goodsComment}
   ],
   // router-link 高亮 类样式  就是用 mui中tabber 中的高亮类样式
   linkExactActiveClass:"mui-active"
})

export default router;